/**
 * @file DeviceBattery.h
 * @brief 电池设备
 * @author Dongcj (1217365417@qq.com)
 * @version 1.0.1
 * @date 2025-07-11
 * 
 * @copyright Copyright (c) 2025  深圳市奥瓦机器人有限公司
 * 
*/
#ifndef DeviceBattery_H
#define DeviceBattery_H

#include "Device.hpp"
#include "common.h"

class DeviceBattery: public Device<Battery_data>{
public:
    string deviceName;
    string deviceType;
    
    void func(Battery_data& data);
    
    // explicit DeviceBattery(const string& interfaceName);
    DeviceBattery(const string& interfaceName, const string& dt);
    ~DeviceBattery();
    
    // 禁止拷贝
    DeviceBattery(const DeviceBattery&) = delete;
    DeviceBattery& operator=(const DeviceBattery&) = delete;

private:
    int socketFd; // 存储CAN socket的文件描述符
    int create(unsigned char data[],int mode,int angle);
};

#endif // DeviceBattery_H